var $PersonalCenterHome = $("#PersonalCenterHome");
define(function () {
	return {
		"init" :function(){
			//获取个人信息
	        $.ajax({
	            url: _CONFIG[__webState].AJAX_URL+ "api/UserMainInfo/GetUserInfo",
	            type: "post",
	            dataType: "json",
	            success: function (data) {
                    ajaxLoading.remove();
                    console.log(data);
					if(data.Code ==0){
                        var _d = data.Data;
	                	$(".uPoints",$PersonalCenterHome).html(_d.Score);
						$("#J_UserName").text(_d.UserName+"，欢迎您");
	                }else{
	                	popWrap.open({content:data.Message,autoClose:false});	
	                }

	            }
	        }).fail(
	        function (xhr, textStatus, err) {
	            popWrap.open({content:"数据获取失败",autoClose:false});
	        });

            //订单状态
            __base.AjaxFun({
                url: __base.url.GetPersonOrderStatus
            },function(data){
                console.log(data);
                if (data["Code"] === "0" ){
                    var $elem =  $(".navList").find(">a"),
                        html = function( count ){
                            return '<span class="count_dd">' + count + '</span>';
                        };
                    $elem.eq(0).append( html(data['Data']['WaitTotal']) );
                    $elem.eq(1).append( html(data['Data']['AlreadyShipped']) );
                }
            });


		}
	}
});


//(function(w,j){
//	function swiper(){};
//	swiper.prototype.init = function(){};
//	swiper.prototype.next =function(){};
//	w.Swiper = new swiper()
//})(window,jQuery)
